<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>table</title>
		  <link rel="stylesheet" type="text/css" href="lianxi.css"/>
		<style >
			body{
				text-align: center;
			}
			th{
				border: 1px #1E90FF solid;
				width: 200px;
			}
			td{
				border: 1px  #1E90FF solid;
			}
			.del{
				color: blue;
				cursor: pointer;
				text-align: center;
			}
			
		</style>
	</head>
	<body>
		<div id="content">
      <FORM METHOD=POST ACTION="" name="form" onsubmit="return formq();">
        <p>
          <span>姓名：</span>
          <input type="text" id="name" value="" class="border" />
        </p>
        
        <p>
          <span>班级：</span>
          <input type="text" id="bj"value="" class="border" />
        </p>
       <p>
          <span>学号：</span>
          <input type="text" id="number"value="" class="border" />
        </p>
         <div class="button">
          <input type="submit"id="ss" name="" value="提交" class="l20" />
        </div>
      </FORM>
        
		<table style="border: 1PX #1E90FF solid; align-content: center;margin:0 auto;">
			<header>
				<th >
					姓名
				</th>
				<th>
					学号
				</th>
				<th>
					班级
				</th>
				<th>
					班级
				</th>
				<th >
					操作栏
				</th>
	</header>
		</table>
	</form>
	</body>
	<script type="text/javascript"> 
		function formq(){
		   var text1=document.getElementById("name").value;
		   var text2=document.getElementById("bj").value;
		   var text3=document.getElementById("number").value;
		   if(text1==""){
		     alert("姓名不能为空！");
		     return false;
		   }
		   if(text2==""){
		     alert("班级不能为空！");
		     return false;
		   }
		   if(text3==""){
		     alert("学号不能为空！");
		     return false;
		   }
		   return true;
		}
		
		<!--function addText
		{
			let oTextWrapper =document.getElementById('Text1')           
			let th=document.createElement("th")
			let td=document.createElement("td")	
			oTable.appendChild(th)
			th.appendChild(td)
		}
		-->
		function del(e){
			console.dir(e.parentNode.parentNode)
			e.parentNode.parentNode.removeChild(e.parentNode)
		}
	</script>
</html>
